from urllib.parse import urlparse
from urllib.request import urlopen

if __name__ == "__main__":
    o = urlparse("https://www.w3cschool.cn/?s=python+%E6%95%99%E7%A8%8B")
    print(o.scheme)
    print(o.hostname)
    print(o.path)